//
//  NSDate+Extension.m
//  iOS Object
//
//  Created by 保密 on 2019/7/10.
//  Copyright © 2019年 XiaoHaiBao. All rights reserved.
//

#import "NSDate+Extension.h"

@implementation NSDate (Extension)

+ (NSDateFormatter *)dateFormatter {
    static NSDateFormatter *dateFormatter;
    if(!dateFormatter){
        dateFormatter = [NSDateFormatter new];
        dateFormatter.dateFormat = @"yyyy-MM-dd";
    }
    return dateFormatter;
}

+ (NSDateFormatter *)dateFormatter:(NSString *)dateFormatterString {
    static NSDateFormatter *dateFormatter;
    if(!dateFormatter){
        dateFormatter = [NSDateFormatter new];
        dateFormatter.dateFormat = dateFormatterString;
    }
    return dateFormatter;
}

@end
